<?php
/**
 * Created by Pako
 * Date: 2019/5/15
 * Time: 21:21
 */

namespace App\Http\Request\Ad;


use App\Http\Request\Store;

class PositionStore extends Store
{
    public function rules()
    {
        $mothod = strtoupper($this->method());
        if ($mothod == 'POST') {
            return [
                'title' => 'required',
                'status' => 'required',
                'width' => 'required',
                'height' => 'required',
                'client' => 'required',


            ];
        } else {
            return [
                'position_id' => 'required',
                'title' => 'filled',
                'status' => 'filled',
                'width' => 'filled',
                'height' => 'filled',
                'client' => 'filled',
            ];
        }
    }

    public function attributes()
    {
        return [
            'title' => "位置名称",
            'status' => "是否禁用",
            'width' => '宽度',
            'height' => '高度',
            'client' => '客户端',
        ];
    }
}